/*
 * PageRank.h
 *
 *  Created on: Nov 22, 2009
 *      Author: abhishek
 */

#ifndef PAGERANK_H_
#define PAGERANK_H_

#include "Headers.h"
#include "Outlink.h"

class PageRank {
public:
	PageRank();
	virtual ~PageRank();

	void loadData();
	void computePageRank();

	double* pageRank();
private:

	void writeToFile();
	double distance();
	void createOutlink(int nodeId, vector<int> destinations);
	static void splitString(string str, vector<string>& stringVector, string delimiter );

	double pageRank_[NUMNODES] ;
	double oldPageRank_[NUMNODES] ;
	Outlink* nodes_[NUMNODES] ;

};

#endif /* PAGERANK_H_ */
